#ifndef _MOVE_SPRITE_FX_H_
#define _MOVE_SPRITE_FX_H_

#include "sfx.h"
#include "ui/ui_sprite.h"
#include "math/vec2.h"
#include "math/counter.h"
namespace vfx
{

// holder for sprites that only exists for one cycle
class MoveSpriteSFX : public SFXSet
{
public:
	struct	MoveSprite
	{
		ui::UISprite		Sprite;
		math::Vec2			Pos, From, To;
		math::Vec2			Size;
		COLOR				Color;
		bool				Active;
		math::Counter		Progress;
		float				SineAmp, SizeAmp;
	};
	MoveSpriteSFX(EffectMan*	pParent, const std::string& Image, int	MaxCount, bool Additive = false);
	virtual					~MoveSpriteSFX();
	virtual void			Render(const math::Vec2& Offset, float Scale);
	virtual void			Tick(float dt);
	void					AddSprite(const math::Vec2& Pos, const math::Vec2& To, float Time, float SineAmp = 0.1f, float SizeAmp = 0.5f, COLOR Color = 0xFFFFFFFF);
	void					GetSpriteSize(math::Vec2& Size);
	void					SetAdditive(bool b) { m_Additive = b; };
private:
	int						m_MaxCount;
	int						m_CurrentCount;
	MoveSprite*				m_SpriteA;
	math::Vec2				m_SpriteSize;
	bool					m_Additive;
};

};
#endif // _MOVE_SPRITE_FX_H_
